package com.itic.appbase.framework.type;

public enum PayType {
	alipay("001","支付宝"),wx("002","微信"),balance("003","余额"),gzh("004","公众号");
	private String type;
	private String name;
	PayType(String type,String name){
		this.type = type;
		this.name = name;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	public static PayType getPayType(String type){
		PayType payType = null;
		switch(type){
		case"001":
			payType = PayType.alipay;
			break;
		case"002":
			payType = PayType.wx;
			break;
		case"003":
			payType = PayType.balance;
			break;
		case"004":
			payType = PayType.gzh;
			break;
		default:break;
		}
		return payType;
	}
}
